package strategies;

import dao.BaseDAO;
import general.IContext;
import web.*;

/**
 *
 * @author Alejandro
 */
public abstract class AbstractStrategy implements IStrategy {
    protected Context ctx;
    protected ParamStorage pp;
    protected HtmlOutput op;
    protected BaseDAO dao;

    protected AbstractStrategy() {
    }

    protected void prepareContext(IContext context) {
        ctx = (Context) context;
        op = ctx.getOutputProvider();
        pp = ctx.getParamProcessor();
        dao = ctx.getDAO();
    }

    @Override
    public abstract void executeOperation(IContext context);

}
